<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<f:view>
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <link rel="stylesheet" type="text/css" href="css/messages.css" />
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title>Simple Forum</title>
        </head>
        <body>
            <h2>Login</h2>
            <h:form id="login">
                <h:panelGrid border="1" columns="2">
                    <h:outputLabel for="username" value="username" />
                    <h:inputText id="username" value="#{loginController.username}" />

                    <h:outputLabel for="password" value="password" />
                    <h:inputSecret id="password" value="#{loginController.password}" />

                    <h:panelGroup>&nbsp;</h:panelGroup>
                    <h:panelGroup>
                        <h:commandButton value="Login" action="#{loginController.login}" />
                    </h:panelGroup>
                </h:panelGrid>
            </h:form>
            <h:messages infoClass="infoMessages" errorClass="errorMessages" showSummary="true" showDetail="false" />

            <p>
                <h:form id="register">
                    Or you may want to register: <h:commandLink action="register" value="here" />.
                </h:form>
            </p>

        </body>
    </html>
</f:view>